package com.woniuedu.search.entity;

import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 * 讲师
 * </p>
 *
 * @author yuankaiqiang
 * @since 2022-04-19
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Setter
@Getter
@Document(indexName = "teacher")
@Builder
public class Teacher implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @Field(name="id", type = FieldType.Keyword)
    private String id;

    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    @ApiModelProperty(value = "讲师姓名")
    private String name;

    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    @ApiModelProperty(value = "讲师简介")
    private String intro;

    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    @ApiModelProperty(value = "讲师资历,一句话说明讲师")
    private String career;

    @Field
    @ApiModelProperty(value = "头衔 1高级讲师 2首席讲师")
    private Integer level;

    @Field
    @ApiModelProperty(value = "讲师头像")
    private String avatar;

    @Field
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @Field("is_deleted")
    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    @TableField("is_deleted")
    private Integer isDeleted;

    @Field("gmt_create")
    @ApiModelProperty(value = "创建时间")
    @TableField("gmt_create")
    private LocalDateTime gmtCreate;

    @Field("gmt_modified")
    @ApiModelProperty(value = "更新时间")
    @TableField("gmt_modified")
    private LocalDateTime gmtModified;


}
